<template>
	<div id="flightOrderDetail">
		<header>
			<p>
				<span>订单号：</span>
				<b>{{order.orderNumber}}</b>
			</p>
			<p v-if="order.pssOrderNumber">
				<span>外部订单号：</span>
				<b>{{order.pssOrderNumber}}</b>
			</p>
			<p>
				<span>供应商：</span>
				<b>{{order.supplierName}}</b>
			</p>
			<p>
				<span>订单状态：</span>
				<b>{{order.orderStatus|orderStatus}}</b>
			</p>
		</header>
		<div>
			<Title :text="'支付信息'"/>
			<div class="payMess">
				<p>
					<b class="money">￥{{order.adultPrice+order.adultTFC}}</b>
					<span>X</span>
					<span>{{order.adultCount}}</span>
				</p>
				<p class="smallFont">
					<span>订单总价</span>
				</p>
				<p v-if="order.payType">
					<span>支付方式：</span>
					<b>{{order.payType}}</b>
				</p>
				<p v-if="order.payeeTradesn" class="smallFont">
					<span>支付流水号：</span>
					<span>{{order.payeeTradesn}}</span>
				</p>
			</div>
			<Title :text="'航班信息'"/>
			<div class="flightMess">
				<table>
					<tr>
						<th>航班号</th>
						<th>舱位</th>
						<th>机场</th>
						<th>航班日期</th>
						<th>机型</th>
						<th>经停</th>
						<th>中转</th>
						<th>价格</th>
						<th>基建/燃油</th>
						<th>退改签</th>
					</tr>
					<tr>
						<td>{{order.flights[0].flightNumber}}</td>
						<td>{{order.flights[0].cabin|cabinRank}}</td>
						<td>{{order.flights[0].departureCity}}{{order.flights[0].departureCode}}{{order.flights[0].departureTerminal}}</br>
							{{order.flights[order.flights.length-1].arrivalCity}}{{order.flights[0].arrivalCode}}{{order.flights[0].arrivalTerminal}}
						</td>
						<td>{{order.flights[0].departureDate}}</td>
						<td>{{order.flights[0].planeModel}}</td>
						<td>{{order.flights[0].stopoverinfo}}</td>
						<td>{{order.flights.length>1?"是":""}}</td>
						<td>{{order.adultPrice}}</td>
						<td>{{order.adultTFC}}</td>
						<td><span class="endorse">改签详情</span></td>
					</tr>
				</table>
			</div>
			<Title :text="'旅客信息'"/>
			<div class="passengerMess">
				<table>
					<tr>
						<th>姓名</th>
						<th>旅客类型</th>
						<th>证件类型</th>
						<th>证件号码</th>
						<th>手机号码</th>
						<th>票号展示</th>
						<!--<th>状态</th>-->
						<th>结算价/票面价</th>
						<th>基建/燃油</th>
						<th>改签单号</th>
						<th>退票单号</th>
					</tr>
					<tr v-for="passenger in passengers">
						<td>{{passenger.lastName_cn}}</td>
						<td>{{passenger.passageType|passengerType}}</td>
						<td>{{passenger.docType|docType}}</td>
						<td>{{passenger.docId}}</td>
						<td>{{passenger.mobile}}</td>
						<td>{{passenger.ticketNumber}}</td>
						<!--<td></td>-->
						<td>{{passenger.realSettle}}/{{passenger.realPrice}}</td>
						<td>{{passenger.realTFC}}</td>
						<td>{{passenger.endorseOrderNumber}}</td>
						<td>{{passenger.refundOrderNumber}}</td>
					</tr>
				</table>
			</div>
			<Title :text="'联系人信息'"/>
			<div class="connectMess">
				<table>
					<tr>
						<th>联系人</th>
						<th>手机</th>
						<th>邮箱</th>
					</tr>
					<tr>
						<td>{{order.contactUser}}</td>
						<td>{{order.contactMobile}}</td>
						<td>{{order.contactEmail}}</td>					
					</tr>
				</table>
			</div>
			<!--<Title :text="'附加产品'"/>
			<div class="addMess">
				附加产品
			</div>-->
			<Title :text="'备注/日志'"/>
			<div class="logMess">
				<table>
					<tr>
						<th>序号</th>
						<th>姓名</th>
						<th>时间</th>
						<th>操作</th>
						<th>备注</th>
					</tr>
					<tr v-for="(log,index) in logs">
						<td>{{index+1}}</td>
						<td>{{log.data.operateUsername}}</td>
						<td>{{log.data.operateTime}}</td>
						<td>{{log.data.operateState}}</td>
						<td>{{log.data.remarks}}</td>
					</tr>
				</table>
			</div>
		</div>
	</div>
</template>

<script>
	import main from './main';
	export default {
		...main
	}
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style lang="scss">
	@import "./style.scss";
</style>